﻿' Copyright (c) Microsoft Corporation.  All rights reserved.

Imports System.ServiceModel
Imports MyTravelPostService.MyTravelPostModel

<ServiceContract()> _
Public Interface IMyTravelPostService

    ' Returns all the travel blogs that have postings
    <OperationContract()> _
    Function GetAllTravelBlogs() As List(Of Blog)

    ' gets the blog by ID
    <OperationContract()> _
    Function GetBlog(ByVal blogID As Integer) As Blog

    ' returns the latest blog posting from passed in blog.
    <OperationContract()> _
    Function GetLatestBlogPosting(ByVal blog As Blog) As BlogPost

    ' Get the people in the system
    <OperationContract()> _
    Function GetPeople() As List(Of Person)

    ' Adds new comments
    <OperationContract()> _
    Function AddComment(ByVal newComment As Comment) As Comment

    ' Delete the comments from the system
    <OperationContract()> _
    Sub DeleteComment(ByVal deleteComment As Comment)

    ' Will search for existing comments and merge the two lists together
    <OperationContract()> _
    Function UpdateComments(ByVal orginalComments As List(Of Comment), ByVal updatedComments As List(Of Comment)) As List(Of Comment)

    ' will take a blog and update to the new blog owner only by the entity key
    <OperationContract()> _
    Sub ChangeBlogowner(ByVal blog As Blog, ByVal newBlogOwnerKey As EntityKey)

End Interface
